import React from 'react'

const empty = () => () => "empty function"

export const AppContext = React.createContext({
	menuCollapsed: true,
	setMenuCollapsed: empty(),
	userInfo: {},
	userInfoBusy: false,
	refreshUser:empty(),
})

export const appContext = Component => props => (
	<AppContext.Consumer>
		{context => <Component {...props} context={context}/>}
	</AppContext.Consumer>
)